import Menus from '../../components/Menus/page.vue';
import Navigator from '../../components/Navigator/page.vue';
import {
  V_Menus,
} from '@/src/common/data.js';
export default { 
  data() {
    return {
      menus: [],
    }
  },
  components: {
    Menus,
    Navigator
  },
  methods: {
    handerUrl(menuList) {
      let url = location.href.split('/#/')[0];
      menuList.forEach((item, index) => {
        if (item.subItems) {
          item.subItems.url = url + item.subItems.url;
        } else {
          item.url = url + item.url;
        }
      })
    }
  },
  mounted() {
    this.menus = V_Menus;
    this.handerUrl(this.menus);
  }
}